package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomScreeningPhqDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomScreeningPhqEntity;
import com.healthcloud.service.losewisdom.LoseWisdomScreeningPhqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;



@Service("loseWisdomScreeningPhqService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomScreeningPhqServiceImpl implements LoseWisdomScreeningPhqService {

	@Autowired
	private LoseWisdomScreeningPhqDao loseWisdomScreeningPhqDao;
	
	@Override
	public LoseWisdomScreeningPhqEntity queryObject(Integer id){
		return loseWisdomScreeningPhqDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomScreeningPhqEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomScreeningPhqDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomScreeningPhqDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomScreeningPhqEntity loseWisdomScreeningPhq){
		loseWisdomScreeningPhq.setCreateTime(new Date());
		loseWisdomScreeningPhqDao.save(loseWisdomScreeningPhq);
	}
	
	@Override
	public void update(LoseWisdomScreeningPhqEntity loseWisdomScreeningPhq){
		loseWisdomScreeningPhq.setUpdateTime(new Date());
		loseWisdomScreeningPhqDao.update(loseWisdomScreeningPhq);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomScreeningPhqDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomScreeningPhqDao.deleteBatch(ids);
	}
	
}
